Registry Guide for Windows Registry Guide for Windows
Part of the WinGuides Network
WinGuides Network and Software
Registry tweaks, tricks & hacks to optimize, enhance and secure Microsoft Windows.

Disable Command Prompt and Batch Files (Windows 2000/XP)
Category: Home > Windows > Accessories > Command Processor

Download this tweak with Tweak Manager!This tweak can be easily applied using WinGuides Tweak Manager.
Download a free trial now!

This restriction allows you to selectively disable the Command Prompt (CMD) and the ability to execute DOS batch files.

Open your registry and find or create the key below.

Create or modify the DWORD value "DisableCMD" and set it to a number from the list below.

  • 0 - (default) enable command prompt and batch files
  • 1 - disable command prompt and batch files
  • 2 - disable command prompt but allow batch files
The change should take effect immediately.

Registry Editor Example
|NameTypeData|
|(Default)REG_SZ(value not set)|
|DisableCMDREG_DWORD0x00000001 (1)|
-
|HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System|
-

Settings:
User Key: [HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System]
Name: DisableCMD
Type: REG_DWORD (DWORD Value)
Value: (0 = default, 1 = disabled, 2 = disabled but allow batch)

Disclaimer: Modifying the registry can cause serious problems that may require you to reinstall your operating system. We cannot guarantee that problems resulting from modifications to the registry can be solved. Use the information provided at your own risk.

Last Modified: August 5, 2002

 Return to Index Copyright © 1998-2003. All Rights Reserved.  License